package com.zwan.oam_rtc.imps;

import com.zwan.oam_rtc.bean.PnoHandlerSettings;
import com.zwan.oam_rtc.utils.messages.MessageHead;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

/**
 * 处理来自于SCP的数据包
 * @author Administrator
 *
 */

public interface PnoHandler  {
	void init(int pno);
	void service(MessageHead header, int eventid, ByteBuffer buffer, ByteOrder byteOrder);
//	protected void sendMessage(int eventid, ByteBuffer buffer);
void sendMessage(int eventid, byte[] body);
//	public ByteBuffer sendRequest(int eventid, ByteBuffer buffer);
void destroy();
	void registerWaiter(int cidIndex, MessageWaiter messageWaiter);
	void registerWaiter(String snid, MessageWaiter messageWaiter);
	void unRegisterWaiter(String snid, MessageWaiter messageWaiter);
	void unRegisterWaiter(int cidIndex, MessageWaiter messageWaiter);
	void init(PnoHandlerSettings pnoHandlerSettings);
}
